#! /usr/bin/env python2.5

coins = [200,100,50,20,10,5,2,1]

def gen(n,index=0):
    if index == len(coins)-1:
        yield [n]
    else:
        for i in range(0,n/coins[index]+1):
            for k in gen(n-coins[index]*i, index+1):
                yield [i] + k

if __name__ == '__main__':
    i = 0
    for k in gen(200):
        i+=1
        print k
    print i
